<%@page import="com.easyweb.model.Tag"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.easyweb.model.Article"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	Article article = (Article) request.getAttribute("article");
	Map<String, Tag> tagMap = (Map<String, Tag>) request.getAttribute("tag");
	String tagstr = article.getTag();
	StringBuffer tagsb = new StringBuffer();
	String[] array = tagstr.split(",");
	for (String tag : array) {
		tagsb.append("<span class='label' name='").append(tagMap.get(tag).getId())
				.append("' style='background-color:").append(tagMap.get(tag).getTagColor())
				.append("!important;margin-right:2px;'>").append(tagMap.get(tag).getTagName())
				.append("</span>");
	}
%>
<!DOCTYPE html>
<html>
<head>
<title><%=article.getTitle()%>-微儿博客</title>
<%@include file="basic.jsp"%>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<link rel="stylesheet" type="text/css"
	href="<%=CSS_PATH%>front/tagcloud.css">
</head>
<body>
	<%@include file="header.jsp"%>
	<div class="container">
		<div class="row clearfix">
			<div class="col-md-8 col-sm-12">
				<!-- location -->
				<div class="col-sm-12 col-md-12 text-left">
					<p></p>
				</div>
				<!-- location end-->
				<div class="col-sm-12 col-md-12 text-center">
					<h2><%=article.getTitle()%></h2>
				</div>
				<div class="row text-center subtext padding-lr-10">
					<div class="col-sm-6">
						<span>编辑时间:<%=new SimpleDateFormat("yyyy-MM-dd").format(article.getUpdateTime())%></span>
					</div>
					<div class="col-sm-6">
						<span>浏览量:<%=article.getReadCount()%></span>
					</div>
				</div>
				<!-- content -->
				<div class="row artile-content padding-lr-10">
					<%=article.getContent()%>
				</div>
				<!-- content end-->
				<div class="panel panel-default">
					<div class="panel-heading">
						<span style="float: left">标签 :&nbsp;&nbsp;</span> <span
							class="tag" id="tag"><%=tagsb.toString()%></span>
					</div>
				</div>
				<!-- JiaThis Button BEGIN -->
				<div class="jiathis_style">
					<span class="jiathis_txt">分享到：</span>
					<a class="jiathis_button_tools_1"></a>
					<a class="jiathis_button_tools_2"></a>
					<a class="jiathis_button_tools_3"></a>
					<a class="jiathis_button_tools_4"></a>
					<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">更多</a>
				</div>
				<script type="text/javascript" src="http://v3.jiathis.com/code_mini/jia.js" charset="utf-8"></script>
				<!-- JiaThis Button END -->
				<!-- UY BEGIN -->
				<div id="uyan_frame"></div>
				<script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js"></script>
				<!-- UY END -->
			</div>
			<div class="col-md-4 col-sm-12">
				<%@include file="right.jsp"%>
			</div>
		</div>
	</div>
	<%@include file="footer.jsp"%>
</body>
</html>